import { createSlice } from '@reduxjs/toolkit'

const themeStore = createSlice({
    name: "theme",
    initialState: {
        isTheme: false,
        n:10000
    },
    reducers: {
        toggleTheme(state) {
            state.isTheme = !state.isTheme
        }
    },
})

const { toggleTheme } = themeStore.actions

const themeReducer = themeStore.reducer

export { toggleTheme }
export default themeReducer